package cn.gzjp.modules.logis.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

/**
 * 保险优惠政策Entity
 * @author zengcp
 * @version 2018-05-01
 */
public class LogisBxDiscount extends DataEntity<LogisBxDiscount> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 保险名称
	private Integer beValue;		// 保险额度

	private Integer shzValue;		// 收货主
	private Integer bxcbValue;		// 保险成本
	private Integer lrValue;		// 利润

	private Integer bfValue;		// 保费(优惠前)
	private Integer yhValue;		// 优惠金额
	private String yhName;		// 优惠名称
	private Integer yhhbfValue; // 保费(优惠后)
	
	public LogisBxDiscount() {
		super();
	}

	public LogisBxDiscount(String id){
		super(id);
	}

	@Length(min=0, max=32, message="保险名称长度必须介于 0 和 32 之间")
	@ExcelField(title="保险名称", align=2, sort=1)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="保险额度", align=2, sort=2)
	public Integer getBeValue() {
		return beValue;
	}

	public void setBeValue(Integer beValue) {
		this.beValue = beValue;
	}
	
	@ExcelField(title="保费(需支付)", align=2, sort=3)
	public Integer getBfValue() {
		return bfValue;
	}

	public void setBfValue(Integer bfValue) {
		this.bfValue = bfValue;
	}
	
	@ExcelField(title="收货主", align=2, sort=4)
	public Integer getShzValue() {
		return shzValue;
	}

	public void setShzValue(Integer shzValue) {
		this.shzValue = shzValue;
	}
	
	@ExcelField(title="保险成本", align=2, sort=5)
	public Integer getBxcbValue() {
		return bxcbValue;
	}

	public void setBxcbValue(Integer bxcbValue) {
		this.bxcbValue = bxcbValue;
	}
	
	@ExcelField(title="利润", align=2, sort=6)
	public Integer getLrValue() {
		return lrValue;
	}

	public void setLrValue(Integer lrValue) {
		this.lrValue = lrValue;
	}
	
	@ExcelField(title="优惠额度", align=2, sort=7)
	public Integer getYhValue() {
		return yhValue;
	}

	public void setYhValue(Integer yhValue) {
		this.yhValue = yhValue;
	}
	
	@Length(min=0, max=32, message="优惠名称长度必须介于 0 和 32 之间")
	@ExcelField(title="优惠名称", align=2, sort=8)
	public String getYhName() {
		return yhName;
	}

	public void setYhName(String yhName) {
		this.yhName = yhName;
	}

	public Integer getYhhbfValue() {
		return this.getBfValue()-this.getYhValue();
	}

	public void setYhhbfValue(Integer yhhbfValue) {
		this.yhhbfValue = yhhbfValue;
	}
}